package com.bjdd.jdy.ui.userCenter;

import com.bjdd.jdy.base.BaseResult;
import com.bjdd.jdy.entity.InfoBean;
import com.bjdd.jdy.entity.User;
import com.bjdd.jdy.util.Api;
import com.bjdd.jdy.util.RxSchedulers;

import okhttp3.RequestBody;
import rx.Observable;

/**
 * Created by Administrator on 2017/4/20.
 */

public class UserCenterModel implements UserCenterContract.Model {
    @Override
    public Observable<BaseResult<InfoBean>> getInfo(String token, String carrierId) {
        return Api.getInstance().service
                .info(token,carrierId)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<User>> headPhoto(String token, String carrierId, RequestBody img) {
        return Api.getInstance().service
                .headPhoto(token,carrierId,img)
                .compose(RxSchedulers.io_main());
    }
}
